3.2.73 \(\int \frac {x (A+B x)}{(a+b x)^2} \, dx\)

Optimal. Leaf size=45 \[ \frac {a (A b-a B)}{b^3 (a+b x)}+\frac {(A b-2 a B) \log (a+b x)}{b^3}+\frac {B x}{b^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {77} \begin {gather*} \frac {a (A b-a B)}{b^3 (a+b x)}+\frac {(A b-2 a B) \log (a+b x)}{b^3}+\frac {B x}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(A + B*x))/(a + b*x)^2,x]

[Out]

(B*x)/b^2 + (a*(A*b - a*B))/(b^3*(a + b*x)) + ((A*b - 2*a*B)*Log[a + b*x])/b^3

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {x (A+B x)}{(a+b x)^2} \, dx &=\int \left (\frac {B}{b^2}+\frac {a (-A b+a B)}{b^2 (a+b x)^2}+\frac {A b-2 a B}{b^2 (a+b x)}\right ) \, dx\\ &=\frac {B x}{b^2}+\frac {a (A b-a B)}{b^3 (a+b x)}+\frac {(A b-2 a B) \log (a+b x)}{b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 41, normalized size = 0.91 \begin {gather*} \frac {\frac {a (A b-a B)}{a+b x}+(A b-2 a B) \log (a+b x)+b B x}{b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(A + B*x))/(a + b*x)^2,x]

[Out]

(b*B*x + (a*(A*b - a*B))/(a + b*x) + (A*b - 2*a*B)*Log[a + b*x])/b^3

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x (A+B x)}{(a+b x)^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x*(A + B*x))/(a + b*x)^2,x]

[Out]

IntegrateAlgebraic[(x*(A + B*x))/(a + b*x)^2, x]

________________________________________________________________________________________

fricas [A]  time = 1.42, size = 72, normalized size = 1.60 \begin {gather*} \frac {B b^{2} x^{2} + B a b x - B a^{2} + A a b - {\left (2 \, B a^{2} - A a b + {\left (2 \, B a b - A b^{2}\right )} x\right )} \log \left (b x + a\right )}{b^{4} x + a b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a)^2,x, algorithm="fricas")

[Out]

(B*b^2*x^2 + B*a*b*x - B*a^2 + A*a*b - (2*B*a^2 - A*a*b + (2*B*a*b - A*b^2)*x)*log(b*x + a))/(b^4*x + a*b^3)

________________________________________________________________________________________

giac [A]  time = 0.96, size = 80, normalized size = 1.78 \begin {gather*} \frac {\frac {{\left (b x + a\right )} B}{b^{2}} + \frac {{\left (2 \, B a - A b\right )} \log \left (\frac {{\left | b x + a \right |}}{{\left (b x + a\right )}^{2} {\left | b \right |}}\right )}{b^{2}} - \frac {\frac {B a^{2} b}{b x + a} - \frac {A a b^{2}}{b x + a}}{b^{3}}}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a)^2,x, algorithm="giac")

[Out]

((b*x + a)*B/b^2 + (2*B*a - A*b)*log(abs(b*x + a)/((b*x + a)^2*abs(b)))/b^2 - (B*a^2*b/(b*x + a) - A*a*b^2/(b*
x + a))/b^3)/b

________________________________________________________________________________________

maple [A]  time = 0.01, size = 61, normalized size = 1.36 \begin {gather*} \frac {A a}{\left (b x +a \right ) b^{2}}+\frac {A \ln \left (b x +a \right )}{b^{2}}-\frac {B \,a^{2}}{\left (b x +a \right ) b^{3}}-\frac {2 B a \ln \left (b x +a \right )}{b^{3}}+\frac {B x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(B*x+A)/(b*x+a)^2,x)

[Out]

B*x/b^2+1/b^2*ln(b*x+a)*A-2/b^3*ln(b*x+a)*B*a+a/b^2/(b*x+a)*A-a^2/b^3/(b*x+a)*B

________________________________________________________________________________________

maxima [A]  time = 1.07, size = 53, normalized size = 1.18 \begin {gather*} -\frac {B a^{2} - A a b}{b^{4} x + a b^{3}} + \frac {B x}{b^{2}} - \frac {{\left (2 \, B a - A b\right )} \log \left (b x + a\right )}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a)^2,x, algorithm="maxima")

[Out]

-(B*a^2 - A*a*b)/(b^4*x + a*b^3) + B*x/b^2 - (2*B*a - A*b)*log(b*x + a)/b^3

________________________________________________________________________________________

mupad [B]  time = 0.31, size = 54, normalized size = 1.20 \begin {gather*} \frac {B\,x}{b^2}-\frac {B\,a^2-A\,a\,b}{b\,\left (x\,b^3+a\,b^2\right )}+\frac {\ln \left (a+b\,x\right )\,\left (A\,b-2\,B\,a\right )}{b^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(A + B*x))/(a + b*x)^2,x)

[Out]

(B*x)/b^2 - (B*a^2 - A*a*b)/(b*(a*b^2 + b^3*x)) + (log(a + b*x)*(A*b - 2*B*a))/b^3

________________________________________________________________________________________

sympy [A]  time = 0.49, size = 44, normalized size = 0.98 \begin {gather*} \frac {B x}{b^{2}} + \frac {A a b - B a^{2}}{a b^{3} + b^{4} x} - \frac {\left (- A b + 2 B a\right ) \log {\left (a + b x \right )}}{b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(B*x+A)/(b*x+a)**2,x)

[Out]

B*x/b**2 + (A*a*b - B*a**2)/(a*b**3 + b**4*x) - (-A*b + 2*B*a)*log(a + b*x)/b**3

________________________________________________________________________________________